<template>
	<view class="page">
		<uni-list>
			<uni-list-item title="密码修改" link to="/pages/modified_password/modified_password"></uni-list-item>
			<uni-list-item title="账号修改" link to="/pages/modified_account/modified_account"></uni-list-item>
			<uni-list-item title="证件照修改"  link to="/pages/modified_avater/modified_avater"></uni-list-item>
			<uni-list-item title="关于软件" link to="/pages/about/about"></uni-list-item>
			<uni-list-item title="清空缓存" clickable="true" @click="clearCache()"></uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import uniList from '@/components/uni-list/uni-list.vue';
	import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
	export default {
		components: {
			uniList,
			uniListItem
		},
		data() {
			return {
				name: '',
				role: '',
				avater: '',
				status:'出勤',
				avaterIs:false
			}
		},
		methods: {
			clearCache:function(){
				uni.showModal({
					title: '提示',
					content: '是否清空缓存，清空后需要重新登录',
					success: function(e) {
						if (e.confirm) {
							uni.showLoading({
								title: '正在清空缓存'
							});
							setTimeout(function () {
								uni.hideLoading();
								uni.clearStorageSync();
								uni.removeStorageSync('transfer-certificate');
								uni.redirectTo({
									url:'../login/login'
								})
							}, 2000);
							
						}
					}
				});
			}
		}
	}
</script>

<style lang="less">
	@import url("settings.less");
</style>